package com.easy.image.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration

public class EasyConfg implements WebMvcConfigurer {
	public static final String STATIC_PATH = "/image/url/";
	public static final String STATIC_DIR = "D:\\uploadfile\\";

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler(STATIC_PATH + "**").addResourceLocations("file:" + STATIC_DIR);
		WebMvcConfigurer.super.addResourceHandlers(registry);
	}
}